package com.lxl.hadoop.selfoutputformat;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

/**
 * @Author lixilin
 * @Date 2022/1/2 16:53
 * @Description
 */
public class MyMapper extends Mapper<LongWritable, Text,Text, NullWritable> {

    NullWritable nullWritable = NullWritable.get();

    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        context.write(value,nullWritable);
    }
}
